package cn.ce.core.kit;

import java.io.File;
import java.io.IOException;

public class FileExists{

	// 判断文件是否存在
    public static boolean judeFileExists(File file) {
    	
        if (file.exists()) {
            System.out.println("file exists");
            return true;
        } else {
            System.err.println("file not exists");
            return false;
        }

    }
    /*
     * 获取项目路径
     */
    public static String filePath(){
    	File directory = new File("");//参数为空 
    	String courseFile = null;
		try {
			courseFile = directory.getCanonicalPath();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return courseFile+"\\src\\main\\resources\\lock.properties";
    }
}
